SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)

AUX_SOURCE_DIRECTORY(./comm DIR_SRC)
AUX_SOURCE_DIRECTORY(./conf DIR_SRC)
AUX_SOURCE_DIRECTORY(./event DIR_SRC)
AUX_SOURCE_DIRECTORY(./http DIR_SRC)

ADD_LIBRARY(znx STATIC ${DIR_SRC} ${MODULES_SRC})
TARGET_LINK_LIBRARIES(znx PUBLIC  ${PROJECT_SOURCE_DIR}/libs/openssl/lib/)

TARGET_LINK_LIBRARIES(znx PUBLIC ${PROJECT_SOURCE_DIR}/libs/openssl/lib/libcrypto.so)
TARGET_LINK_LIBRARIES(znx PUBLIC ${PROJECT_SOURCE_DIR}/libs/openssl/lib/libssl.so)
TARGET_LINK_LIBRARIES(znx PUBLIC ${PROJECT_SOURCE_DIR}/libs/yaml/lib/libyaml.a)
TARGET_LINK_LIBRARIES(znx PUBLIC pthread m)
